package managers.popupManager;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ComponentListener;

import javax.swing.Timer;

public class TimedInformationDialog extends InformationDialog implements Timed {

	Timer timer;
	
	public TimedInformationDialog(ComponentListener listener, int delay, String eventType) {
		super(listener, eventType);
		timer = new Timer(delay, new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent arg0) {
				setVisible(false);
			}
		});
	}

	
	@Override
	public void startTimer() {
		timer.setRepeats(false);
		timer.start();

	}

}
